home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
N-O
/
NeuEdit1.cpt
/
NeuEdit v1.0
/
background_2769.txt
< prev
next >
Wrap
Text File
|
1988-12-05
|
8KB
|
384 lines
-- background: 2769 from stack: in.0
-- bmap block id: 3132
-- flags: 0000
-- background id: 0
-- name: startup
-- part 1 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=410 top=5 right=21 bottom=444
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Help
----- HyperTalk script -----
on mouseUp
showdialog 1,4397,"",TRUE,10,158
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=478 top=5 right=21 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: File
----- HyperTalk script -----
on mousedown
put the mouseloc into myPlace
put item 1 of myPlace - 100 into horiz
put item 2 of myPlace +100 into vert
get PopUpMenu("New;Load Text File;Save as Text File;Print",0,vert,horiz)
put it into result
if result is 3 then
put line 1 of bg fld 1 into thename
put newfilename("Filename to save",thename) into thename
open file thename
write cd fld "textfield" to file thename
close file thename
end if
if result is 4 then
doMenu "Print Report..."
end if
if it is 1 then
if cd fld "textfield" is empty then
put "Untitled" into bg fld 1
exit mousedown
end if
answer"Delete current contents?" with "Yes" or "No"
if it is "Yes" then
put empty into cd fld "textfield"
put "Untitled" into bg fld 1
end if
end if
if result is 2 then
put filename("TEXT") into thename
if thename is not empty then
open file thename
read from file thename until "–"
put it into cd fld "textfield"
close file thename
set scroll of cd fld "textfield" to 0
put lastpathcomponent(thename) into bg fld 1
end if
end if
end mousedown
-- part 3 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=1 top=2 right=20 bottom=216
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 2048
-- line height: 16
-- part name: docname
----- HyperTalk script -----
on mousedown
put the mouseloc into myPlace
put item 1 of myPlace + 100 into horiz
put item 2 of myPlace +100 into vert
get PopUpMenu("File Statistics;Card Directory",0,vert,horiz)
put it into result
if result is 1 then
put empty into cd fld "stats"
put the number of lines in cd fld "textfield" into nl
put "# of Lines: "&nl into line 1 of cd fld "stats"
put the number of characters in cd fld "textfield" into nc
put "# of Characters: "&nc into line 2 of cd fld "stats"
put "# of words: "&the number of words in cd fld "textfield" into line 3 of cd fld "stats"
show cd fld "stats"
end if
if result is 2 then
set lockscreen to true
push card
get id of last card of background "startup"
put it into lid
go to first card of background "startup"
repeat forever
put line 1 of bg fld 1 &"," after last word of pagelist
if the id of this card is lid then
exit repeat
end if
go to next card of this background
end repeat
pop card
set lockscreen to false
DoList"Go to","Never Mind",pagelist,ONE
put item 2 of the result into it
find whole it in bg fld 1
end if
end mousedown
-- part 5 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=376 top=5 right=21 bottom=410
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Font
----- HyperTalk script -----
on mouseUp
set lockscreen to true
choose field tool
click at loc of cd fld "textfield"
doMenu "Text Style..."
choose browse tool
set lockscreen to false
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=358 top=5 right=21 bottom=376
-- title width / last selected line: 0
-- icon id / first selected line: 16560 / 16560
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: goright
----- HyperTalk script -----
on mouseUp
go to next card of this background
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=340 top=5 right=21 bottom=358
-- title width / last selected line: 0
-- icon id / first selected line: 15420 / 15420
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: goleft
----- HyperTalk script -----
on mouseUp
go to previous card of this background
end mouseUp
-- part 13 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=322 top=5 right=21 bottom=340
-- title width / last selected line: 0
-- icon id / first selected line: 1015 / 1015
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: newpage
----- HyperTalk script -----
on mouseUp
answer"Create a new document card?" with "No" or "Yes"
if it is "Yes" then
doMenu "Copy Card"
doMenu "Paste Card"
put empty into cd fld "textfield"
put "Untitled" into bg fld 1
end if
end mouseUp
-- part 14 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=304 top=5 right=21 bottom=322
-- title width / last selected line: 0
-- icon id / first selected line: 1018 / 1018
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: del
----- HyperTalk script -----
on mouseup
answer"Delete this document card?" with "Yes" or "No"
if it is "Yes" then
doMenu "Delete Card"
go to next card of this background
end if
end mouseup
-- part 16 (button)
-- low flags: 00
-- high flags: 2002
-- rect: left=286 top=5 right=21 bottom=304
-- title width / last selected line: 0
-- icon id / first selected line: 21847 / 21847
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: gohome
----- HyperTalk script -----
on mouseUp
answer"Go home now?" with "No" or "Yes"
if it is "Yes" then
if the freesize of this stack>0 then
doMenu "Compact Stack"
go home
exit mouseup
end if
go home
end if
end mouseUp
-- part 19 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=444 top=5 right=21 bottom=478
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: S/R
----- HyperTalk script -----
on mousedown
put the mouseloc into myPlace
put item 1 of myPlace - 100 into horiz
put item 2 of myPlace +100 into vert
get PopUpMenu("Search;Search & Replace",0,vert,horiz)
put it into result
if result is 1 then
showdialog 2,9595,"What string do you want to search for?","","",""
put the result into resc
if resc is not empty then
repeat forever
find whole resc
if the result is not empty then
exit repeat
end if
showdialog 1,22212,"",TRUE,2,1
put the result into my
if my= 2 then
exit mousedown
end if
end repeat
end if
end if
if result is 2 then
ShowDialog 2,26157,"Text you want to change","Change to...","","",false
put the result into resc
if resc is empty then exit mousedown
put item 1 of resc into verify
put item 2 of resc into searchfor
put item 3 of resc into replaceit
if searchfor is empty then
exit mousedown
end if
if searchfor=replaceit then
exit mousedown
end if
put empty into amt
repeat forever
find whole searchfor
if the result is not empty then
exit repeat
end if
if verify=false then
do "put replaceit into "&the FoundChunk
end if
if verify=true then
showdialog 1,11072,"",TRUE,2,1
put the result into my
if my= 3 then
exit mousedown
end if
if my= 1 then
do "put replaceit into "&the FoundChunk
end if
end if
end repeat
end if
end mousedown